package com.hanhai.zrb.api.biz.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.github.pagehelper.PageInfo;
import com.hanhai.zrb.model.user.User;
import com.hanhai.zrb.model.user.dto.UserSearchDto;

public interface UserService {
	
	public boolean saveUser(User user);

	User findById(Long id);

	void update(User user);

	User searchUser(String search);
	
	public void updatePassword(User user);
	
	public void updateOrg(User user);
	
	public PageInfo queryUserBySearchDto(UserSearchDto userSearch,Integer pageNum,Integer pageSize);
	
	public void updatePwdByMobile(String umobile,String inputPwd);
	
	List<User> searchUserList(UserSearchDto userSearch);
	
	public PageInfo searchUserPage(UserSearchDto userSearch,Integer pageNum,Integer pageSize);
	
	
	User findByUname(String uname);

	User findByPhone(String mobilephone);

	User findByEmail(String email);

	void updateEmail(User user);
	
	void updateMobile(User user);
	
	/**
	 * 关键字搜索，带分页
	 * @param search
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	public PageInfo queryUserBySearch(String search,Integer pageNum,Integer pageSize);
	
	/**
	 * 关键字搜索用户
	 * @param search
	 * @return
	 */
	public List<User> queryUserBySearch(String search);
	
	
	
	//政府会员关键字收索带分页
	public PageInfo queryUserBySearch(String search, Date beginTimes,
			Date endTimes, Integer status, Integer pageNum, Integer pageSize);
	
	List<User> findByOrgIdAndUserType(Long orgId,Integer type);
	
	List<User> findByUid(List<Long> userIdList);
	
	Map<Long,User> findUserMapByUids(List<Long> userIdList);
	
	boolean upageStatus(List<Long> ids,String status);
	
	public List<String> findUidByRealNameOrUmobile(String keyWords);

}
